﻿@{
    Layout = null;
}

<script src="~/Scripts/MGJJS/OriginsTemplet/OriginsTempletList.js"></script>

<div class="mtlr15">
    <div class="new-row">
        <div class="text-left">
            <button type="button" class="btn btn-success" onclick="TempletList.Dialog_Add(0)">
                <i class=" glyphicon glyphicon-plus-sign"></i>
                新增
            </button>
        </div>
        <div style="flex:1"></div>
    </div>

    <div id="Table">
        <div class="overflow">
            <table class="table table-hover table-bordered">
                <thead>
                    <tr>
                        <th width="15"><input type="checkbox" class="AllClickCheckbox"></th>
                        <th>模板编号</th>
                        <th>模板名称</th>
                        <th>备注</th>
                        <th>创建时间</th>
                        <th>操作</th>
                    </tr>
                </thead>
                <tbody id="OMID" style="display:none;" binding="{'pageId':'ShoppingPager','pageCallback':'TempletList.Ajax_GetOriginsTempletPageList','emptyHtml':OMID_EmptyHtml}">
                    <tr>
                        <td width="15"><input type="checkbox" class="AllClickChild"></td>
                        <td binding="{'text':'Code'}"></td>
                        <td binding="{'text':'Name'}"></td>
                        <td binding="{'text':'Remark','title':'Remark'}"></td>
                        <td binding="{'text':'ChangeDate','textHandle':'datetime'}"></td>
                        <td>
                            <a binding="{'TID':'TempletId'}" onclick="TempletList.Dialog_Add($(this).attr('TID'))">编辑</a>
                            <a binding="{'TID':'TempletId'}" onclick="TempletList.Ajax_DelOriginsTemplete(this)">删除</a>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
        <div id="ShoppingPager"></div>
    </div>
</div>
<script>
    //返回search的结果
    var ColspanNub = $(".table.table-hover.table-bordered").find("tr").children("td").length
    window.OMID_EmptyHtml = '<tr><td colspan="' + ColspanNub + '"><p class="no-result">无符合条件的数据结果</p></td></tr>';

    //渲染table的第一页
    $(function () {
        TempletList.Ajax_GetOriginsTempletPageList(1, "");
    });
</script>









